package com.mall.users.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mall.model.domain.UmsResource;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author LQJdeDELL
* @description 针对表【ums_resource(后台资源表)】的数据库操作Mapper
* @createDate 2023-03-09 22:29:16
* @Entity generator.domain.UmsResource
*/
public interface UmsResourceMapper extends BaseMapper<UmsResource> {

    List<UmsResource> selectByIds(List<Long> ids);

    @Select("select * from ums_resource")
    List<UmsResource> selectAll();

    Integer selectCount(UmsResource resource);

    List<UmsResource> selectByPage(@Param("resource") UmsResource resource, @Param("pageSize") Integer pageSize, @Param("pageNum") Integer pageNum);

    @Select("select * from ums_resource where id = #{id}")
    UmsResource selectById(Long id);

    @Delete("delete from ums_resource where id = #{id}")
    void delete(Long id);

    void save(UmsResource umsResource);

    @Select("select *from ums_resource where name = #{name}")
    UmsResource selectByName(String name);


    void update(UmsResource umsResource);
}




